[Chapter 2] 2.11 Rules
Author: Bryan Costales & Eric Allman
Date: 1999-02-04T00:04:25Z

#

| Chapter 2 The sendmail.cf File |

## 2.11 Rules

Rules are declared in the configuration file with the R command:

>     RLHS tabs RHS [ tabs COMMENT]

Rules are composed of two parts separated by tab characters (an optional third part can follow the first two, also separated by tab characters, and it forms a comment that is ignored).

Each rule forms a do-while statement as shown in Figure 2.2 So long as the LHS evaluates to true, the RHS rewrites the current address in the workspace. LHS evaluation is done by matching wildcard expressions to addresses. RHS rewriting is done by positional substitution. In this chapter we describe the wildcard and positional operators that aid in the writing of rules (see §28.1).

#### Figure 2.2: The behavior of a rule

2.10 The check_ Rule Sets |  | 2.12 Wildcard Operators in the LHS